package br.mikhas.util.jdbc;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Interface used with {@link JdbcTemplate} to help mapping query results
 * 
 * @author n068815 - Mikhail Domanoski
 * 
 */
public interface RowMapper<T> {

	/**
	 * Maps a single row of the result set
	 * 
	 * @param index The index of the current row
	 * @param rs The result set
	 * @return An instance of the entity that the row represents
	 */
	public T mapRow(int index, ResultSet rs) throws SQLException;
}
